<template>
  <view class="body" @click="todetail">
    <view class="content-top">
      <image class="pic" :src="data.extend.pic" mode="aspectFill"></image>
    </view>
    <view class="content-bottom">
      <view class="title">{{ data.content }}</view>
      <view class="nickinfo">
        <image
          class="pic"
          :src="data.extend.admin_img"
          mode="aspectFill"
        ></image>
        <view class="name">{{ data.extend.admin_name }}</view>
      </view>
    </view>
  </view>
</template>

<script>
var app = getApp();
export default {
  props: {
    data: {
      type: Object,
      default: () => {},
    },
    right: Boolean,
  },
  data() {
    return {};
  },
  methods: {
    todetail() {
      app.goto(
        `/pagesEchart/find/works-detail?id=${this.data.extend.shareid}&type=6`
      );
    },
  },
  computed: {},
};
</script>

<style lang="scss" scoped>
.body {
  border-radius: 12rpx;
  overflow: hidden;
  background-color: #f5f5f5;
  width: 350rpx;
  .content-top {
    .pic {
      width: 350rpx;
      height: 350rpx;
    }
  }
  .content-bottom {
    padding: 15rpx;
    .title {
      direction: ltr;
      font-size: 32rpx;
      font-weight: bold;
      color: #333;
      margin-bottom: 20rpx;
      word-break: break-all;
      text-overflow: ellipsis;
      overflow: hidden;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
    }
    .nickinfo {
      display: flex;
      direction: ltr;
      align-items: center;
      .pic {
        width: 55rpx;
        height: 55rpx;
        border-radius: 50%;
        margin-right: 10rpx;
        flex-shrink: 0; // 不缩小
      }
      .name {
        font-size: 27rpx;
        color: #666;
        width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
    }
  }
}
</style>
